<%-- 
    Document   : VistaAniDefuncion
    Created on : 26-oct-2013, 12:07:18
    Author     : WALDIR
--%>

<%@page import="java.sql.*"%>
<%@page import="com.ptr.controladores.conexionsqlserver"%>
<%@page import="com.ptr.ptrsystem.dao.Lista"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript" src="../js/../datepicker/jquery-1.9.1.js"></script>
        <script language="JavaScript">
            function BuscaDatos(sel) {
                if (sel.value == "4") {
                    document.getElementById("btnbusqueda").value = "ActaCDEF";
                    divC = document.getElementById("datos");
                    divC.style.display = "none";
                }
                if (sel.value == "5") {
                    document.getElementById("btnbusqueda").value = "ActaPersonal";
                    divC = document.getElementById("datos");
                    divC.style.display = "none";
                }
                if (sel.value == "6") {
                    document.getElementById("btnbusqueda").value = "nombres";
                    divC = document.getElementById("datos");
                    divC.style.display = "";
                }
            }
        </script>
        <script type="text/javascript">
            $(document).ready(function() {
                x = document.getElementsByTagName("input");
                for (var i = 0; i < x.length; i++)
                {
                    if (x[i].value == "null")
                    {
                        x[i].value = "";
                    }
                }
            });
        </script>

    </head>
    <%
        String nroactaP = (String) request.getAttribute("acta");
        String nroactaD = (String) request.getAttribute("actaD");
        String FechaR = (String) request.getAttribute("fecha");
        String CDeub = (String) request.getAttribute("CDeU");
        String CPrub = (String) request.getAttribute("CPrU");
        String CDiub = (String) request.getAttribute("CDiU");
        String Cotub = (String) request.getAttribute("COtU");
        String Nubd = (String) request.getAttribute("NUD");
        String Lugar = (String) request.getAttribute("lugar");
        String FechaD = (String) request.getAttribute("fechaD");
        String Hora = (String) request.getAttribute("hora");
        String Nmadre = (String) request.getAttribute("madre");
        String Npadre = (String) request.getAttribute("padre");
        String Ndeclarante = (String) request.getAttribute("declarante");
        String nregistrador = (String) request.getAttribute("registrador");
        String Nestado = (String) request.getAttribute("estado");
        String Observaciones = (String) request.getAttribute("obs");
        String persona = (String) request.getAttribute("persona");
        String ruta = (String) request.getAttribute("ruta");
    %>
    <body style="background-color: #f9f9f9 ">
        <form action="${pageContext.request.contextPath}/BusquedaAniDefuncion" method="POST">   
            <div>
                <table border="0" align="center" width="80%" style="border: 1px solid">                
                    <tr><td>
                            <table align="center" border="0" style="background-color: #597498">
                                <tr>
                                    <td style="background-color: #597498"><div><label style="font-size: 1.5em; font-weight: bold; color: white">DATOS CDEF</label></div></td>

                                    <td>
                                        <label style=" color: white; font-size: 0.8em; font-weight: bold; font-family: Arial">Seleccione tipo de Busqueda</label>
                                    </td> 
                                    <td style="width: 13%">
                                        <div>
                                            <select name="TipoBus" onchange="BuscaDatos(this)" style="width: 15em; height: 2em; 
                                                    font-family: Arial; font-weight: bold; background-color: #d4e0f2;
                                                    border: 1px solid #f8e3b9; size: 0.2em; border-radius: 5px 5px 5px 5px"">
                                                <option selected value="0">Seleccione tipo de Acta</option>
                                                <option value="4">Nro Acta CDEF</option>
                                                <option value="5">Nro CUI</option>
                                                <option value="6">Datos Personales</option>
                                            </select>
                                        </div>
                                    </td>

                                </tr>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div id="datos" style="display:none;">
                                <table border="0" align="center" style="color:#f8fcff; font-family: Arial; font-size: 0.8em " >
                                    <td><label>Primer Apellido</label>
                                        <input type="text" name="p_ape" value="" style="border-radius: 5px 5px 5px 5px ;height: 25px;border: 1px solid #64a3f9;background-color: #f8feff"></td>
                                    <td><label>Segundo Apellido</label>
                                        <input type="text" name="s_ape" value="" style="border-radius: 5px 5px 5px 5px ;height: 25px;border: 1px solid #64a3f9;background-color: #f8feff"></td>
                                    <td><label>Prenombre(S)</label>
                                        <input type="text" name="p_nom" value="" style="border-radius: 5px 5px 5px 5px ;height: 25px;border: 1px solid #64a3f9;background-color: #f8feff"></td>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr><td colspan="3">
                            <fieldset style="padding-left:20px;border: 1px solid #f1c363;background-color: #fffde7;width: 72em">
                                <legend style="border: 1px solid #f1c363; background-color: #fffde7; color: #b27244">Datos Personales</legend>
                                <table border="0" align="center" width="100%">
                                    <tr>
                                        <td>
                                            <label/>Nro Acta Personal
                                        </td>
                                        <td>
                                            <input type="text" name="NAP" value="<%=nroactaP%>" style="width: 100px;border: 1px solid #f1c363;background-color: #fdeecd"/>
                                        </td>
                                        <td>
                                            <label />Nro Acta CDEF
                                        </td>
                                        <td>
                                            <input type="text" name="NAD" value="<%=nroactaD%>" style="width: 100px;border: 1px solid #f1c363;background-color: #fdeecd"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label/>CIUDADANO(A)
                                        </td>
                                        <td>
                                            <input type="text" name="" value="<%=persona%>" style="width: 400px;border: 1px solid #f1c363;background-color: #fdeecd"/>
                                        </td>
                                        <td>
                                            <label/>Estado
                                        </td>
                                        <td>
                                            <input type="text" name="" value="<%=Nestado%>" style="width: 100px;border: 1px solid #f1c363;background-color: #fdeecd" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </td></tr>
                </table>
                </td>
                </tr>
                <!--Datos de la Persona!-->
                <tr>            
                    <td>
                        <div>
                            <table align="center" border="0" width="100%">
                                <tr><td width="70%">
                                        <fieldset style="padding-left:20px;border: 1px solid #5ba0ff;background-color: #f5f9ff;width: 50em">
                                            <legend style="border: 1px solid #5ba0ff; background-color: #f5f9ff; color: #85aabb">Datos CDEF</legend>
                                            <table border="0">
                                                <tr>
                                                    <td>
                                                        <label />Nro Acta CDEF
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=nroactaD%>" style="width: 100px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                    <td>
                                                        <label style="padding-left: 15px;" />Fecha De Registro CDEF
                                                    </td>
                                                    <td>
                                                        <input type="text" name="FRM" value="<%= FechaR%>" style="width: 130px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td>
                                                        <label/>Lugar De Ocurrencia
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=Lugar%>"  style="width: 200px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em ">
                                                    </td>

                                                    <td>
                                                        <label style="padding-left: 15px;"/>Fecha De Defuncion
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=FechaD%>"  style="width: 130px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <label/>Hora De Defuncion
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=Hora%>"  style="width: 70px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                        <fieldset style="padding-left:20px;border: 1px solid #5ba0ff;background-color: #f5f9ff;width: 50em">
                                            <legend style="border: 1px solid #5ba0ff; background-color: #f5f9ff; color: #85aabb">Ubigeo CDEF</legend>
                                            <table border="0">
                                                <tr>
                                                    <td><input type="text" name="depm" id="depm" size="2" value="<%=CDeub%>" style="width: 2.0em;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " maxlength="2"></td>
                                                    <td><input type="text" name="provm" id="prom" size="2" value="<%=CPrub%>"  style="width: 2.0em;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " maxlength="2"></td>
                                                    <td><input type="text" name="distm" id="dism" size="2" value="<%=CDiub%>"  style="width: 2.0em;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " maxlength="2"></td>
                                                    <td><input type="text" name="otrom" id="otrm" size="2" value="<%=Cotub%>"  style="width: 2.0em;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " maxlength="2"></td>
                                                    <td><input type="text" name="lugar_m" id="nombreubigeoM" value="<%=Nubd%>"  style="width: 45.0em;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em ">
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                    <td  rowspan="4">
                                        <fieldset style="border: 1px solid #5ba0ff;background-color: #f5f9ff;width: 20em">
                                            <legend style="border: 1px solid #5ba0ff; background-color: #f5f9ff; color: #85aabb">IMAGEN ACTA</legend>
                                            <table border="0" align="center" width="10%">
                                                <tr>
                                                    <td><%%>
                                                        <object width="300px" height="400em">
                                                            <embed src="<%=ruta%>" width="300px" height="400em" alt="">
                                                        </object>
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>

                                    </td>                        

                                <tr>
                                    <td>
                                        <fieldset style="padding-left:20px;border: 1px solid #5ba0ff;background-color: #f5f9ff;width: 50em">
                                            <legend style="border: 1px solid #5ba0ff; background-color: #f5f9ff; color: #85aabb">Otros Datos</legend>
                                            <table border="0">
                                                <tr>
                                                    <td>
                                                        <label/>Nombre Madre
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=Nmadre%>"  style="width: 400px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em ">
                                                    </td>
                                                </tr><tr>
                                                    <td>
                                                        <label/>Nombre Padre
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=Npadre%>"  style="width: 400px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                    <td width="20%" colspan="2" align="right" >
                                                        <button id="btnbusqueda" type="submit" name="btn1" value="" style='width:10.0em; heigth:8em; background-color: #eeeeee;border: 1px solid #9cafff;border-radius: 7px 7px 7px 7px;' ><img src='/RegCivil/imagenes/find.png'>Buscar</button>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <label/>Nombre Declarante
                                                    </td>
                                                    <td>
                                                        <input type="text" name="NT1" value="<%=Ndeclarante%>" style="width: 400px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " />
                                                    </td>
                                                    <td></td>
                                                    <td width="20%" colspan="2" align="right"  >
                                                        <button type="reset" style='width:10.0em; heigth:8em; background-color: #eeeeee;border: 1px solid #9cafff;border-radius: 7px 7px 7px 7px;' ><img src='/RegCivil/imagenes/note_edit.png'>Limpiar</button>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <label/>Nombre Registrador
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=nregistrador%>" style="width: 400px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em "/>
                                                    </td>
                                                    <td width="20%" colspan="2" align="right" >
                                                        <button type=button onclick="" style='width:10.0em; heigth:8em; background-color: #eeeeee;border: 1px solid #9cafff;border-radius: 7px 7px 7px 7px;'><img src='/RegCivil/imagenes/return.png'>Retornar</button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <fieldset style="padding-left:20px;border: 1px solid #5ba0ff;background-color: #f5f9ff;width: 50em">
                                            <legend style="border: 1px solid #5ba0ff; background-color: #f5f9ff; color: #85aabb">Observaciones</legend>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <label/>Observaciones
                                                    </td>
                                                    <td>
                                                        <input type="text" name="" value="<%=Observaciones%>" style="width: 420px;border: 1px solid #5ba0ff;background-color: #f9f9f9;height: 2em " />
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                    </td>
                </tr>
                </table>
            </div>
        </form>
    </body>
</html>
